package com.nuanshui.heatedloan.msgcenter.form;

import com.nuanshui.framework.lang.DateUtil;
import com.nuanshui.framework.lang.SysStringUtils;
import com.nuanshui.heatedloan.msgcenter.model.AppPushMsg;
import com.nuanshui.heatedloan.msgcenter.model.PushParams;
import org.springframework.util.StringUtils;

import java.util.Date;



public class AppPushMsgForm extends AppPushMsg {
	
	private static final long serialVersionUID = -4710518077700563940L;

	private int msgType;  //消息类型 1：系统消息 2：审核消息  3：还款消息
	private String systemContent;//系统消息内容
	private String imageId;
	private String pushTimeStr;//前端传过来的string类型的时间


	private String systemMsgTitle;//系统消息的title

	public String getImageId() {
		return imageId;
	}
	public void setImageId(String imageId) {
		this.imageId = imageId;
	}
	public String getPushTimeStr() {
		return pushTimeStr;
	}
	public void setPushTimeStr(String pushTimeStr) {
		this.pushTimeStr = pushTimeStr;
	}
	@Override
	public Date getPushTime(){
		if(SysStringUtils.isNotEmpty(this.pushTimeStr)){
			return DateUtil.stringToDate(this.pushTimeStr, "yyyy-MM-dd HH:mm:ss");
		}
		return super.getPushTime();
	}
	public String getSystemContent() {
		if(StringUtils.isEmpty(this.systemContent)) return this.getContent();
		return systemContent;
	}
	public void setSystemContent(String systemContent) {
		this.systemContent = systemContent;
	}

	public String getSystemMsgTitle() {
		return systemMsgTitle;
	}
	public void setSystemMsgTitle(String systemMsgTitle) {
		this.systemMsgTitle = systemMsgTitle;
	}

	public int getMsgType() {
		return msgType;
	}

	public void setMsgType(int msgType) {
		this.msgType = msgType;
	}
}
